//
//  STUserTableView.m
//  赛拓
//
//  Created by 王磊 on 8/14/16.
//  Copyright © 2016 立金所. All rights reserved.
//

#import "STUserTableView.h"
#import "STUserHeaderView.h"
@interface STUserTableView()<STBaseViewDelegate>

@property (nonatomic ,strong) STUserHeaderView *headerView;

@end
@implementation STUserTableView

- (STUserHeaderView *)headerView {
    if (!_headerView) {
        
        _headerView = [STUserHeaderView instance];
        
    }
    return _headerView;
}
- (void)updateHeaderData:(id)headerData andTitleData:(id)titleData {
    
    if (!headerData) {
        
        self.headerView.frame = CGRectMake(0, 0, ST_SCREEN_WIDTH, 100 * ST_RATE);
        
    }
    self.headerView.mDelegate = self;
    
    [self.headerView updateHeaderData:headerData andTitleData:titleData];
    
    self.tableHeaderView = self.headerView;
}
- (void)onItemClick:(STItemClickType)itemType withData:(id)data forIndexPath:(NSIndexPath *)indexPath {
    
    [self.mDelegate onItemClick:itemType withData:data forIndexPath:indexPath];
}
@end
